Ext.define('BEST.view.cmsuser.List' ,{
    extend: 'Ext.grid.Panel',
    alias : 'widget.cmsuserlist',
    store: 'CmsuserStore',
    selModel:Ext.create('Ext.selection.CheckboxModel',{mode:"SINGLE"}),
    title : '信息列表',
    initComponent: function() {
    	Ext.apply(this,{
    		columns:[
        	{header: 'ID',  dataIndex: 'tcuId', align:'center',hidden:true, flex: 1},
            {header: '登录名',  dataIndex: 'tcuName', align:'center', flex: 1},
            {header: '姓名',  dataIndex: 'tcuRealName', align:'center', flex: 1},
            {header: '电话',  dataIndex: 'tcuTel', align:'center', flex: 1},
            {header: '邮箱',  dataIndex: 'tcuEmail', align:'center', flex: 1},
            {header: '状态',  dataIndex: 'tcuStatus',align:'center',  flex: 1,
            	renderer:function(value){
            		if(value==1){
            			return "<span style='color:green'>正常</span>";
            		}else{
            			return "<span style='color:red'>禁用</span>";
            		}
            	}
            
            }
        ],
        stripeRows: true,
	    columnLines:true,// 添加列的框样式
	    dockedItems: [{
			xtype: 'toolbar',
			dock: 'top',
			items: [{
				text: '添加',
				iconCls:'icon-add',
				itemId: 'add'
			},{
				text: '修改',
				iconCls:'icon-edit',
				itemId: 'edit',
				disabled: true
			},{
				text:'删除',
				iconCls:'icon-del',
				itemId:'delete',
				disabled:true
			},{
				text:'启用/禁用',
				iconCls:'icon-user-state',
				itemId:'state',
				disabled:true
			}]
		},{
                xtype: 'pagingtoolbar',
                store: 'CmsuserStore',  // same store GridPanel is using
                dock: 'bottom', // 分页 位置
                emptyMsg: '没有数据',
                pageSize:10,
                displayInfo: true,
                displayMsg: '当前显示{0}-{1}条记录 / 共{2}条记录 ',
                beforePageText: '第',
                afterPageText: '页/共{0}页'
	    }]
	   });
       this.callParent(arguments);
    }
});